(feat) Provide example integration with Rustls crate#138
Merged
jonhoo merged 4 commits intojonhoo:masterfrom Sep 18, 2019
brycefisher:feat/rustls-support
Merged
(feat) Provide example integration with Rustls crate#138jonhoo merged 4 commits intojonhoo:masterfrom brycefisher:feat/rustls-support
jonhoo merged 4 commits intojonhoo:masterfrom
brycefisher:feat/rustls-support
Conversation
By checking this code in as an example, we can prevent bitrot as we continuously test this in CI. It also demonstrates how to setup TLS without relying on platform specific dependencies via native_tls crate.
The underlying Rust library for crypto `ring` using multiple `#[cfg_attr()]` properties together which stabilized in rust 1.33.0: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#language-4 Previously, everything else in this could be compiled with rust 1.32.0, so this may constitute a breaking change.
jonhoo
reviewed
Sep 18, 2019
jonhoo
reviewed
Sep 18, 2019
|
|
||
| fn main() -> Result<(), Box<dyn Error>> { | ||
| // Read config from environment or .env file | ||
| dotenv().ok(); |
Owner
There was a problem hiding this comment.
I think we probably don't need to include dotenv in this example.
Contributor
Author
|
I know!!! I was disappointed by this too. The current version of Rustls is tested against 1.36.0 and one of its dependencies relies on the alloc crate (cant remember which one).
There's a few things we could do here:
1. Somehow compile the rustls example code separately since everything else in the imap crate is 1.32.0 compatible (probably make a separate crate as a cargo workspace)
2. Downgrade rustls until we find something that works at a lower version number.
I'd probably opt for 1
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Contributor
Author
|
Perfect! I'll take it out
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Owner
|
Hmm... Testing with a separate version just for one subcrate will be annoying, as will not having it show up as a regular example. I think I'm inclined to keep the MSRV version bump. It's too bad, but I don't think it's actually a problem since the bump won't apply to those who rely just on the |
jonhoo
approved these changes
Sep 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By checking this code in as an example, we can prevent bitrot as we continuously test this
in CI. It also demonstrates how to setup TLS without relying on platform specific dependencies
via native_tls crate.
First step of #123